load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "backupdest",
    srcs = [
        "backup_destination.go",
        "incrementals.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/ccl/backupccl/backupdest",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/ccl/backupccl/backupbase",
        "//pkg/ccl/backupccl/backupinfo",
        "//pkg/ccl/backupccl/backuppb",
        "//pkg/ccl/backupccl/backuputils",
        "//pkg/cloud",
        "//pkg/cloud/cloudpb",
        "//pkg/jobs/jobspb",
        "//pkg/roachpb",
        "//pkg/security/username",
        "//pkg/settings",
        "//pkg/settings/cluster",
        "//pkg/sql",
        "//pkg/sql/pgwire/pgcode",
        "//pkg/sql/pgwire/pgerror",
        "//pkg/util/encoding",
        "//pkg/util/hlc",
        "//pkg/util/ioctx",
        "//pkg/util/mon",
        "//pkg/util/timeutil",
        "//pkg/util/tracing",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "backupdest_test",
    srcs = [
        "backup_destination_test.go",
        "incrementals_test.go",
        "main_test.go",
    ],
    exec_properties = select({
        "//build/toolchains:is_heavy": {"test.Pool": "large"},
        "//conditions:default": {"test.Pool": "default"},
    }),
    deps = [
        ":backupdest",
        "//pkg/ccl",
        "//pkg/ccl/backupccl/backupbase",
        "//pkg/ccl/backupccl/backuptestutils",
        "//pkg/ccl/backupccl/backuputils",
        "//pkg/cloud",
        "//pkg/cloud/impl:cloudimpl",
        "//pkg/jobs/jobspb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/security/username",
        "//pkg/server",
        "//pkg/sql",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/hlc",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/randutil",
        "//pkg/util/timeutil",
        "@com_github_stretchr_testify//require",
    ],
)
